﻿using System;

namespace Informant.Authentication
{
	public interface IAuthenticationClient
	{
		/// <summary>
		/// Gets a value indicating whether this instance is logged on.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if this instance is logged in; otherwise, <c>false</c>.
		/// </value>
		Boolean LoggedOn { get; }
		/// <summary>
		/// Logs on the specified user.
		/// </summary>
		/// <param name="username">The username.</param>
		/// <param name="password">The password.</param>
		/// <exception cref="System.Security.Authentication.AuthenticationException"/>
		/// <exception cref="System.Net.WebException"/>
		/// <exception cref="System.InvalidOperationException"/>
		Boolean LogOn(String username, String password);
		/// <summary>
		/// Logs off the current user.
		/// </summary>
		/// <returns>True if successful.</returns>
		/// <exception cref="System.Security.Authentication.AuthenticationException"/>
		/// <exception cref="System.Net.WebException"/>
		/// <exception cref="System.InvalidOperationException"/>
		Boolean LogOff();
	}
}
